//
//  UserManager.h
//  HiZhua
//
//  Created by Jpwang on 2017/8/7.
//  Copyright © 2017年 Jpwang. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <objc/runtime.h>

@interface User : NSObject

@property(strong, nonatomic) NSString *phone;
@property(strong, nonatomic) NSString *tid;
@property(strong, nonatomic) NSString *token;


@property(assign, nonatomic) NSInteger binded;

@property(assign, nonatomic) NSInteger firstIn;
@property(strong, nonatomic) NSString *imgUrl;
@property(strong, nonatomic) NSString *nick;
@property(strong, nonatomic) NSString *name;

@property(assign, nonatomic) NSInteger expire;
@property(strong, nonatomic) NSNumber *refreshExpire;
@property(strong, nonatomic) NSString *refreshSession;
@property(strong, nonatomic) NSString *session;
@property(assign, nonatomic) NSInteger uid;
@property(assign, nonatomic) NSInteger userType;
@property(assign, nonatomic) NSInteger uuid;
@property(assign, nonatomic) NSInteger gender;

@property(strong, nonatomic) NSString *email;
@property(strong, nonatomic) NSString *contactName;
@property(strong, nonatomic) NSString *contactPhone;
@property(strong, nonatomic) NSString *country;
@property(strong, nonatomic) NSString *province;
@property(strong, nonatomic) NSString *city;
@property(strong, nonatomic) NSString *district;
@property(strong, nonatomic) NSString *detailAddress;

@property(assign, nonatomic) NSInteger succGrab;
@property(assign, nonatomic) NSInteger totalGrab;
@property(assign, nonatomic) NSInteger paidPoint;
@property(assign, nonatomic) NSInteger givePoint;
@property(assign, nonatomic) NSInteger totalPoint;
@property(assign, nonatomic) NSInteger partnerId;
@property(assign, nonatomic) NSInteger ranking;
@property(strong, nonatomic) NSString *recmdCode;

@property(strong, nonatomic) NSNumber *grabLevel;
@property(strong, nonatomic) NSNumber *vipLevel;

@property(strong, nonatomic) NSNumber *lastLoginTime;
@property(strong, nonatomic) NSNumber *mcardGivePoint;
@property(strong, nonatomic) NSNumber *mcardValidDays;

- (NSDictionary *)properties;

@end


@interface UserManager : NSObject

@property(strong, nonatomic) User *user;

+ (UserManager *)shareInstance;

//- (void)setUserinfo:(NSDictionary *)userinfo;

- (void)setLoginMsg:(NSDictionary *)message;

- (BOOL)isUserLogin;

- (void)logout;


@end
